﻿<ResourceDictionary
  xmlns:SkypieeClient="clr-namespace:SkypieeClient" 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xml:lang="en-US"
	xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
  >

  <Style x:Key="cmbStyle" TargetType="{x:Type ComboBox}">
    <Setter Property="FocusVisualStyle">
      <Setter.Value>
        <Style>
          <Setter Property="Control.Template">
            <Setter.Value>
              <ControlTemplate>
                <Rectangle SnapsToDevicePixels="True" Stroke="#FF000000" StrokeDashArray="1 2" StrokeThickness="1" Margin="4,4,21,4"/>
              </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Style>
      </Setter.Value>
    </Setter>
    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
    <Setter Property="Margin" Value="0,0,0,0"/>
    <Setter Property="Padding" Value="2,1,2,1"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ComboBox}">
          <Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
              <Microsoft_Windows_Themes:ClassicBorderDecorator x:Name="Border" Background="{TemplateBinding Background}" BorderStyle="Sunken" BorderThickness="2,2,2,2">
                <Microsoft_Windows_Themes:ClassicBorderDecorator.BorderBrush>
                  <SolidColorBrush/>
                </Microsoft_Windows_Themes:ClassicBorderDecorator.BorderBrush>
                <Popup Focusable="False" AllowsTransparency="True" IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" x:Name="PART_Popup">
                  <Microsoft_Windows_Themes:SystemDropShadowChrome MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding Path=ActualWidth, ElementName=Border}" x:Name="Shdw" Color="#00FFFFFF">
                    <Border x:Name="DropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1,1,1,1">
                      <ScrollViewer>
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained"/>
                      </ScrollViewer>
                    </Border>
                  </Microsoft_Windows_Themes:SystemDropShadowChrome>
                </Popup>
              </Microsoft_Windows_Themes:ClassicBorderDecorator>
              <DockPanel Margin="2,2,2,2">
                <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right"/>
                <Border Margin="{TemplateBinding Padding}" x:Name="SelectedItemBorder">
                  <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,1,1,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"/>
                </Border>
              </DockPanel>
              <ToggleButton Focusable="False" Margin="2,2,2,2" MinHeight="0" MinWidth="0" Width="Auto" ClickMode="Press" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                <ToggleButton.Style>
                  <Style TargetType="{x:Type ToggleButton}">
                    <Setter Property="MinWidth" Value="0"/>
                    <Setter Property="MinHeight" Value="0"/>
                    <Setter Property="Width" Value="Auto"/>
                    <Setter Property="Height" Value="Auto"/>
                    <Setter Property="Background" Value="#00FFFFFF"/>
                    <Setter Property="BorderBrush">
                      <Setter.Value>
                        <SolidColorBrush/>
                      </Setter.Value>
                    </Setter>
                    <Setter Property="BorderThickness" Value="2,2,2,2"/>
                    <Setter Property="Template">
                      <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ToggleButton}">
                          <DockPanel SnapsToDevicePixels="True" Background="{TemplateBinding Background}" LastChildFill="False">
                            <Microsoft_Windows_Themes:ClassicBorderDecorator x:Name="Border" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" BorderBrush="{TemplateBinding BorderBrush}" BorderStyle="AltRaised" BorderThickness="{TemplateBinding BorderThickness}" DockPanel.Dock="Right">
                              <Path Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M0,0L3.5,4 7,0z"/>
                            </Microsoft_Windows_Themes:ClassicBorderDecorator>
                          </DockPanel>
                          <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="True">
                              <Setter Property="BorderStyle" TargetName="Border" Value="AltPressed"/>
                            </Trigger>
                          </ControlTemplate.Triggers>
                        </ControlTemplate>
                      </Setter.Value>
                    </Setter>
                    <Style.Triggers>
                      <Trigger Property="IsEnabled" Value="False">
                        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
                      </Trigger>
                    </Style.Triggers>
                  </Style>
                </ToggleButton.Style>
              </ToggleButton>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelectionBoxHighlighted" Value="True"/>
                <Condition Property="IsDropDownOpen" Value="False"/>
              </MultiTrigger.Conditions>
              <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
            </MultiTrigger>
            <Trigger Property="IsSelectionBoxHighlighted" Value="True">
              <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
            </Trigger>
            <Trigger Property="HasItems" Value="False">
              <Setter Property="MinHeight" TargetName="DropDownBorder" Value="95"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
              <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
            </Trigger>
            <Trigger Property="IsGrouping" Value="True">
              <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
            </Trigger>
            <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="True">
              <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
              <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="IsEditable" Value="True">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Padding" Value="1,1,1,1"/>
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type ComboBox}">
              <Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <Grid>
                  <Microsoft_Windows_Themes:ClassicBorderDecorator x:Name="Border" Background="{TemplateBinding Background}" BorderStyle="Sunken" BorderThickness="2,2,2,2">
                    <Microsoft_Windows_Themes:ClassicBorderDecorator.BorderBrush>
                      <SolidColorBrush/>
                    </Microsoft_Windows_Themes:ClassicBorderDecorator.BorderBrush>
                    <Popup Focusable="False" AllowsTransparency="True" IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" x:Name="PART_Popup">
                      <Microsoft_Windows_Themes:SystemDropShadowChrome MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding Path=ActualWidth, ElementName=Border}" x:Name="Shdw" Color="#00FFFFFF">
                        <Border x:Name="DropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1,1,1,1">
                          <ScrollViewer>
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained"/>
                          </ScrollViewer>
                        </Border>
                      </Microsoft_Windows_Themes:SystemDropShadowChrome>
                    </Popup>
                  </Microsoft_Windows_Themes:ClassicBorderDecorator>
                  <ToggleButton Focusable="False" Margin="2,2,2,2" MinHeight="0" MinWidth="0" Width="Auto" ClickMode="Press" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                    <ToggleButton.Style>
                      <Style TargetType="{x:Type ToggleButton}">
                        <Setter Property="MinWidth" Value="0"/>
                        <Setter Property="MinHeight" Value="0"/>
                        <Setter Property="Width" Value="Auto"/>
                        <Setter Property="Height" Value="Auto"/>
                        <Setter Property="Background" Value="#00FFFFFF"/>
                        <Setter Property="BorderBrush">
                          <Setter.Value>
                            <SolidColorBrush/>
                          </Setter.Value>
                        </Setter>
                        <Setter Property="BorderThickness" Value="2,2,2,2"/>
                        <Setter Property="Template">
                          <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ToggleButton}">
                              <DockPanel SnapsToDevicePixels="True" Background="{TemplateBinding Background}" LastChildFill="False">
                                <Microsoft_Windows_Themes:ClassicBorderDecorator x:Name="Border" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" BorderBrush="{TemplateBinding BorderBrush}" BorderStyle="AltRaised" BorderThickness="{TemplateBinding BorderThickness}" DockPanel.Dock="Right">
                                  <Path Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M0,0L3.5,4 7,0z"/>
                                </Microsoft_Windows_Themes:ClassicBorderDecorator>
                              </DockPanel>
                              <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked" Value="True">
                                  <Setter Property="BorderStyle" TargetName="Border" Value="AltPressed"/>
                                </Trigger>
                              </ControlTemplate.Triggers>
                            </ControlTemplate>
                          </Setter.Value>
                        </Setter>
                        <Style.Triggers>
                          <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
                          </Trigger>
                        </Style.Triggers>
                      </Style>
                    </ToggleButton.Style>
                  </ToggleButton>
                  <DockPanel Margin="2,2,2,2">
                    <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right"/>
                    <TextBox Margin="{TemplateBinding Padding}" x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{Binding Path=IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}">
                      <TextBox.Style>
                        <Style TargetType="{x:Type TextBox}">
                          <Setter Property="OverridesDefaultStyle" Value="True"/>
                          <Setter Property="AllowDrop" Value="True"/>
                          <Setter Property="MinWidth" Value="0"/>
                          <Setter Property="MinHeight" Value="0"/>
                          <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                          <Setter Property="Template">
                            <Setter.Value>
                              <ControlTemplate TargetType="{x:Type TextBox}">
                                <ScrollViewer Focusable="False" x:Name="PART_ContentHost" Background="#00FFFFFF" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
                              </ControlTemplate>
                            </Setter.Value>
                          </Setter>
                        </Style>
                      </TextBox.Style>
                    </TextBox>
                  </DockPanel>
                </Grid>
              </Border>
              <ControlTemplate.Triggers>
                <Trigger Property="HasItems" Value="False">
                  <Setter Property="MinHeight" TargetName="DropDownBorder" Value="95"/>
                </Trigger>
                <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="True">
                  <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
                  <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
                </Trigger>
                <Trigger Property="IsEnabled" Value="False">
                  <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                  <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                </Trigger>
                <Trigger Property="IsGrouping" Value="True">
                  <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
    </Style.Triggers>
  </Style>
</ResourceDictionary>
